#ifndef _RPC_CONTROLIMPL_H_
#define _RPC_CONTROLIMPL_H_

#include "rpc_fwd.h"

#pragma once

class RPCControllerImpl : public google::protobuf::RpcController
{
public:
    RPCControllerImpl();
    virtual ~RPCControllerImpl() throw();
    virtual void Reset();
    virtual bool Failed() const;
    virtual std::string ErrorText() const;
    virtual void StartCancel();
    virtual void SetFailed( const std::string & reason );
    virtual bool IsCanceled() const;
    virtual void NotifyOnCancel( google::protobuf::Closure * callback );

private:
    bool        m_cancel_flag;
    bool        m_failed_flag;
    std::string m_failed_reason;
};

#endif

